// var mongoose = require('mongoose');
// var mongoosePaginate = require('mongoose-paginate');
//
// var Schema =mongoose.Schema;
//
// var UserSchema = new Schema({
//     name:String,
//     password:String,
//     date: { type: Date, default: Date.now }
// })
//
// UserSchema.plugin(mongoosePaginate);
//
// module.exports = mongoose.model('User',UserSchema,'user');

//修改后的
var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');

var schema = new mongoose.Schema({
    name:String,
    password:String,
    date: { type: Date, default: Date.now }
});
schema.plugin(mongoosePaginate);

var User = mongoose.model('User',schema,'user');

module.exports = User;